{% extends "base.html" %}

{% block title %} News {% endblock %}

{% block content %}

<h1>News Orangeade:</h1>

{% for post in post_list %}
<h2>{{ post.title }} posté le {{ post.formatted_date }}</h2>
<p>{{ post.content }}</p>
{% endfor %}

{# navigation entre les pages de news #}
{% if is_paginated %}
	{% if has_previous %}
		<a href="?page={{previous}}">News Précedentes</a>
	{% endif %}
	
	{% if has_next %}
		<a href="?page={{next}}">News Suivantes</a>
	{% endif %}
{% endif %}

{% endblock %}